﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using Digitalmes.Model.WmsManagement;
using Digitalmes.Model;

namespace Digitalmes.ViewModel.WmsManagement.InboundVMs
{
    public partial class InboundTemplateVM : BaseTemplateVM
    {
        
        [Display(Name = "_Model._Inbound._Material")]
        public ExcelPropety Material_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.MaterialId);
        [Display(Name = "_Model._Inbound._InQty")]
        public ExcelPropety InQty_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.InQty);
        [Display(Name = "_Model._Inbound._InBatch")]
        public ExcelPropety InBatch_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.InBatch);
        [Display(Name = "_Model._Inbound._InboundDate")]
        public ExcelPropety InboundDate_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.InboundDate, true);
        [Display(Name = "_Model._Inbound._SupplierId")]
        public ExcelPropety SupplierId_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.SupplierId);
        [Display(Name = "_Model._Inbound._SupplierName")]
        public ExcelPropety SupplierName_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.SupplierName);
        [Display(Name = "_Model._Inbound._InMode")]
        public ExcelPropety InMode_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.InMode);
        [Display(Name = "_Model._Inbound._SheetId")]
        public ExcelPropety SheetId_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.SheetId);
        [Display(Name = "_Model._Inbound._SheetNo")]
        public ExcelPropety SheetNo_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.SheetNo);
        [Display(Name = "_Model._Inbound._InOperator")]
        public ExcelPropety InOperator_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.InOperator);
        [Display(Name = "_Model._Inbound._IsValid")]
        public ExcelPropety IsValid_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.IsValid);
        [Display(Name = "_Model._Inbound._TenantCode")]
        public ExcelPropety TenantCode_Excel = ExcelPropety.CreateProperty<Inbound>(x => x.TenantCode);

	    protected override void InitVM()
        {
            
            Material_Excel.DataType = ColumnDataType.ComboBox;
            Material_Excel.ListItems = DC.Set<MaterialDoc>().GetSelectListItems(Wtm, y => y.TenantCode.ToString());

        }

    }

    public class InboundImportVM : BaseImportVM<InboundTemplateVM, Inbound>
    {
            //import

    }

}